# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=tinfoleak
pkgver=3.6469eb3
pkgrel=5
groups=('blackarch' 'blackarch-recon' 'blackarch-social' 'blackarch-webapp')
pkgdesc='Get detailed information about a Twitter user activity.'
arch=('any')
url='https://github.com/technoskald/tinfoleak/'
license=('custom:unknown')
depends=('python2' 'python2-tweepy')
makedepends=('git')
source=('git+https://github.com/technoskald/tinfoleak.git')
sha512sums=('SKIP')

pkgver() {
  cd $pkgname

  echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD)
}

prepare() {
  cd $pkgname

  sed -i 's|/usr/bin/python|/usr/bin/python2|' "$pkgname.py"
}

package() {
  cd $pkgname

  install -Dm 755 "$pkgname.py" "$pkgdir/usr/bin/$pkgname"
  install -Dm 644 -t "$pkgdir/usr/share/doc/$pkgname/" README.md
}

